Optimal. Leaf size=53 \[ -\frac {x^{-2 n}}{4 n}+\frac {b x^{-n}}{4 n}+\frac {1}{8} b^2 \log (x)-\frac {b^2 \log \left (2+b x^n\right )}{8 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {272, 46}
\begin {gather*} -\frac {b^2 \log \left (b x^n+2\right )}{8 n}+\frac {1}{8} b^2 \log (x)+\frac {b x^{-n}}{4 n}-\frac {x^{-2 n}}{4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 272
Rubi steps
\begin {align*} \int \frac {x^{-1-2 n}}{2+b x^n} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^3 (2+b x)} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{2 x^3}-\frac {b}{4 x^2}+\frac {b^2}{8 x}-\frac {b^3}{8 (2+b x)}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {b x^{-n}}{4 n}+\frac {1}{8} b^2 \log (x)-\frac {b^2 \log \left (2+b x^n\right )}{8 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 45, normalized size = 0.85 \begin {gather*} -\frac {x^{-2 n} \left (2-2 b x^n\right )-b^2 \log \left (x^n\right )+b^2 \log \left (n \left (2+b x^n\right )\right )}{8 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 48, normalized size = 0.91
method | result | size |
risch | \(\frac {b \,x^{-n}}{4 n}-\frac {x^{-2 n}}{4 n}+\frac {b^{2} \ln \left (x \right )}{8}-\frac {b^{2} \ln \left (x^{n}+\frac {2}{b}\right )}{8 n}\) | \(48\) |
norman | \(\left (\frac {b^{2} \ln \left (x \right ) {\mathrm e}^{2 n \ln \left (x \right )}}{8}-\frac {1}{4 n}+\frac {b \,{\mathrm e}^{n \ln \left (x \right )}}{4 n}\right ) {\mathrm e}^{-2 n \ln \left (x \right )}-\frac {b^{2} \ln \left (2+b \,{\mathrm e}^{n \ln \left (x \right )}\right )}{8 n}\) | \(59\) |
meijerg | \(-\frac {\left (-1\right )^{\mathrm {csgn}\left (i b \right )+\mathrm {csgn}\left (i x^{n}\right )+\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i b \right )} b^{2} \left (-\left (-1\right )^{-\frac {-1-2 n}{n}-\frac {1}{n}} \ln \left (1-\frac {i x^{n} b \left (-1\right )^{\frac {\mathrm {csgn}\left (i b \right )}{2}+\frac {\mathrm {csgn}\left (i x^{n}\right )}{2}-\frac {\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i b \right )}{2}}}{2}\right )+\left (-1\right )^{-\frac {-1-2 n}{n}-\frac {1}{n}} \left (n \ln \left (x \right )-\ln \left (2\right )+\ln \left (b \right )+i \left (\frac {\mathrm {csgn}\left (i b \right )}{2}+\frac {\mathrm {csgn}\left (i x^{n}\right )}{2}-\frac {\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i b \right )}{2}-\frac {1}{2}\right ) \pi \right )-\frac {\left (-1\right )^{\frac {\left (\frac {-1-2 n}{n}+\frac {1}{n}\right ) \mathrm {csgn}\left (i b \right )}{2}+\frac {\left (\frac {-1-2 n}{n}+\frac {1}{n}\right ) \mathrm {csgn}\left (i x^{n}\right )}{2}-\frac {\left (\frac {-1-2 n}{n}+\frac {1}{n}\right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i b \right )}{2}-\frac {-1-2 n}{2 n}-\frac {1}{2 n}} x^{\left (\frac {-1-2 n}{n}+\frac {1}{n}\right ) n} 2^{-\frac {-1-2 n}{n}-\frac {1}{n}} b^{\frac {-1-2 n}{n}+\frac {1}{n}}}{2}-\left (-1\right )^{\frac {\left (1+\frac {-1-2 n}{n}+\frac {1}{n}\right ) \mathrm {csgn}\left (i b \right )}{2}+\frac {\left (1+\frac {-1-2 n}{n}+\frac {1}{n}\right ) \mathrm {csgn}\left (i x^{n}\right )}{2}-\frac {\left (1+\frac {-1-2 n}{n}+\frac {1}{n}\right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i b \right )}{2}-\frac {-1-2 n}{2 n}-\frac {1}{2 n}+\frac {1}{2}} x^{\left (1+\frac {-1-2 n}{n}+\frac {1}{n}\right ) n} 2^{-1-\frac {-1-2 n}{n}-\frac {1}{n}} b^{1+\frac {-1-2 n}{n}+\frac {1}{n}}\right )}{8 n}\) | \(452\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 47, normalized size = 0.89 \begin {gather*} \frac {1}{8} \, b^{2} \log \left (x\right ) - \frac {b^{2} \log \left (\frac {b x^{n} + 2}{b}\right )}{8 \, n} + \frac {b x^{n} - 1}{4 \, n x^{2 \, n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.50, size = 50, normalized size = 0.94 \begin {gather*} \frac {b^{2} n x^{2 \, n} \log \left (x\right ) - b^{2} x^{2 \, n} \log \left (b x^{n} + 2\right ) + 2 \, b x^{n} - 2}{8 \, n x^{2 \, n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 20.64, size = 66, normalized size = 1.25 \begin {gather*} \begin {cases} \frac {\log {\left (x \right )}}{2} & \text {for}\: b = 0 \wedge n = 0 \\\frac {\log {\left (x \right )}}{b + 2} & \text {for}\: n = 0 \\- \frac {x^{- 2 n}}{4 n} & \text {for}\: b = 0 \\\frac {b^{2} \log {\left (x^{n} \right )}}{8 n} - \frac {b^{2} \log {\left (x^{n} + \frac {2}{b} \right )}}{8 n} + \frac {b x^{- n}}{4 n} - \frac {x^{- 2 n}}{4 n} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{x^{2\,n+1}\,\left (b\,x^n+2\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________